{% load static simpletags sptags %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>编辑</title>
    {% block header %}
        <link rel="stylesheet" href="{% static '/admin/simpleui-x/elementui/theme-chalk/index.css' %}">
        <link rel="stylesheet" href="{% static 'admin/simplepro/css/editor.css' %}?_=1.2.2"/>
    {% endblock %}
</head>
<body>
{% block js %}
    <script type="text/javascript" src="{% static '/admin/simpleui-x/js/vue.min.js' %}"></script>
    <script type="text/javascript" src="{% static '/admin/simpleui-x/elementui/index.js' %}"></script>
    <script type="text/javascript" src="{% static 'admin/simplepro/js/pegged.js' %}?_={% get_sp_version %}"></script>
    {% if request.method == 'POST' %}
        <script type="text/javascript">
            var data ={{ data|safe }};
            parent.iframe_callback(data.state, data.msg);
        </script>
    {% endif %}
    <script type="text/javascript">
        {#new Pegged().auto({{ types|safe }});#}
    </script>
{% endblock %}

{% block form %}
    <form method="post">
        {% csrf_token %}
        <table>
            {{ form |safe }}
        </table>
        {#    <input type="submit" value="Submit"/>#}
    </form>
{% endblock %}
</body>
</html>